﻿using System.Collections.Generic;
using System.ComponentModel;
using LiveTiss.Classes;

namespace LiveTiss.Schemas
{
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.ans.gov.br/padroes/tiss/schemas")]
    public partial class ct_identificacaoPrestadorEquipe : IDataErrorInfo
    {
        #region Public Properties - Custom

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public List<KeyValuePair<string, string>> identificacaoPrestadorEquipeItems
        {
            get
            {
                return XML_enum.IdentificacaoPrestadorEquipe;
            }
        }

        #endregion

        #region IDataErrorInfo

        private string _error = null;
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public string Error { get { return _error; } }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public string this[string propertyName]
        {
            get
            {
                _error = null;
                switch (propertyName)
                {
                    case "Item":
                        if (this.itemElementNameField != ItemChoiceType4.conselhoProfissional)
                        {
                            if (string.IsNullOrEmpty(this.itemField as string))
                            {
                                _error = "Campo Obrigatório";
                            }
                        }
                        break;
                }
                return _error;
            }
        }

        #endregion
    }
}
